
*	************************************************************************
* 	File-Name: 		CTEP_2014_Chindia_replication.do
*	Date:  			9 May 2014
*	Authors: 		Patrick Bayer, Johannes Urpelainen, and Alice Xu
*	Journal:		International Environmental Agreements: Politics, Law and Economics
* 	Paper:			Explaining Sub-National Patterns of Clean Technology Transfer to China and India
*
*	Data Used:  	Chindia.dta	
*	Purpose:   		.do file for replication
*	Software:		Stata IC 12.1
*	Machine:		WINDOWS 7
*
*	************************************************************************

clear all

* NB: Please place .do file and data in the same folder
use "./Chindia.dta"
set more off, permanently


*	************************************************************************
*	(I) MAIN TEXT
*	************************************************************************

*	************************************************************************
*	1. Summary statistics (Table 1)
*	************************************************************************

* Summary statistics for China
eststo clear
quietly: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year if india==0, inflate (lnpop) vce(cluster id)
estpost summarize transferdummy nontech lngdp lnind lnelec polchange lnpop if e(sample)

* Summary statistics for India
eststo clear
quietly: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year if india==1, inflate (lnpop) vce(cluster id)
estpost summarize transferdummy nontech lngdp lnind lnelec polchange lnpop if e(sample)


*	************************************************************************
*	2. Correlation matrices (Table 2)
*	************************************************************************

* Correlation matrix for China
eststo clear
quietly: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year if india==0, inflate (lnpop) vce(cluster id)
estpost correlate transferdummy nontech lngdp lnind lnelec polchange lnpop if e(sample), matrix

* Correlation matrix for India
eststo clear
quietly: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year if india==1, inflate (lnpop) vce(cluster id)
estpost correlate transferdummy nontech lngdp lnind lnelec polchange lnpop if e(sample), matrix


*	************************************************************************
*	3. Main results (Table 3)
*	************************************************************************

eststo clear
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)


*	************************************************************************
*	4. Results for placebo test (Table 4)
*	************************************************************************

eststo clear
eststo: zinb nontech lngdp lnind india indiaXlngdp indiaXlnind year, inflate (lnpop) vce(cluster id)
eststo: zinb nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)
eststo: zinb nontech transferdummy lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)


*	************************************************************************
*	(II) APPENDIX
*	************************************************************************

*	************************************************************************
*	A3 -- Summary statistics and correlation matrix for full sample (Tables A2+A3)
*	************************************************************************

* Summary statistics (Table A2)
eststo clear
quietly: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)
estpost summarize transferdummy nontech lngdp lnind lnelec polchange lnpop india if e(sample)

* Correlation matrix (Table A3)
eststo clear
quietly: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)
estpost correlate transferdummy nontech lngdp lnind lnelec polchange india lnpop if e(sample), matrix


*	************************************************************************
*	A5 -- Robustness: Exclusion of early and late years (Tables A6+A7)
*	************************************************************************


* Exlude year 2004 projects (Table A6)
eststo clear
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind year if year > 2004, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year if year > 2004, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year if year > 2004, inflate (lnpop) vce(cluster id)

* Exclude year 2010 projects (Table A7)
eststo clear
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind year if year < 2010, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year if year < 2010, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year if year < 2010, inflate (lnpop) vce(cluster id)

*	************************************************************************
*	A6 -- Robustness: Exclusion of project types (Tables A8-A10)
*	************************************************************************


* Models without renewable projects (Table A8)
eststo clear
eststo: zinb TTwoRenew lngdp lnind india indiaXlngdp indiaXlnind year, inflate (lnpop) vce(cluster id)
eststo: zinb TTwoRenew lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)
eststo: zinb TTwoRenew nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)


* Models without energy efficiency projects (Table A9)
eststo clear
eststo: zinb TTwoEEsupply lngdp lnind india indiaXlngdp indiaXlnind year, inflate (lnpop) vce(cluster id)
eststo: zinb TTwoEEsupply lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)
eststo: zinb TTwoEEsupply nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)


* Models without methance, coal, and cement projects (Table A10)
eststo clear
eststo: zinb TTwoCH4 lngdp lnind india indiaXlngdp indiaXlnind year, inflate (lnpop) vce(cluster id)
eststo: zinb TTwoCH4 lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)
eststo: zinb TTwoCH4 nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)


*	************************************************************************
*	A7 -- Robustness: Controlling for CDM promotion policies (Table A11)
*	************************************************************************

eststo clear
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind year CDMpromotion, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year CDMpromotion, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year CDMpromotion, inflate (lnpop) vce(cluster id)


*	************************************************************************
*	A8 -- Robustness: Controlling for renewable energy potential (Table A12)
*	************************************************************************

eststo clear
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind year wind solar hydro, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year wind solar hydro, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year wind solar hydro, inflate (lnpop) vce(cluster id)

*	************************************************************************
*	A9 -- Robustness: Controlling for HFC and N2O projects (Tables A13+A14)
*	************************************************************************

* Controlling for HFC and N2O projects (Table A13)
eststo clear
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind year hfcn2o, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year hfcn2o, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year hfcn2o, inflate (lnpop) vce(cluster id)

* Excluding HFC and N2O projects (Table A14)
eststo clear
eststo: zinb transferdummy_wohfc lngdp lnind india indiaXlngdp indiaXlnind year, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy_wohfc lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy_wohfc nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec polchange indiaXpolchange year, inflate (lnpop) vce(cluster id)

*	************************************************************************
*	A10 -- Robustness: Controlling for governmental change (Table A15)
*	************************************************************************

eststo clear
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec govchange indiaXgovchange year, inflate (lnpop) vce(cluster id)
eststo: zinb transferdummy nontech lngdp lnind india indiaXlngdp indiaXlnind lnelec indiaXlnelec govchange indiaXgovchange year, inflate (lnpop) vce(cluster id)
